<div class="smart-rightPanel layui-form">
    <div class="layui-anim layui-anim-upbit">
        <blockquote class="site-text layui-elem-quote">

        </blockquote>
        <table id="list_table" class="layui-hide" lay-filter="mainList"></table>
    </div>
</div>
<script>
    layui.use(['layer', 'table', 'form','jquery'], function () {
        var layer = layui.layer;
        var table = layui.table;
        var form = layui.form;
        var  $ = layui.jquery;
        var tableObj = table.render({
            id: 'list_table'
            , elem: '#list_table'
            , url: 'buss/account/log'
            , where:{userId:getHashParam().id}
            , align: "center"
            , cols: [[ //表头
                {field: 'id', title: '编号',align: 'center',hide:true}
                , {field: 'userName', title: '用户名', width: 140, align: 'center' , templet: function (d) {
                        return '<a class="font-primary" href="views/index.html#/buss/user/list[id='+d.userId+']">'+d.userName+'</a>'
                    }}
                , {field: 'taskName', title: '记录来源', width: 140, align: 'center' , templet: function (d) {
                       if(d.logtype==1){
                           return '<a class="font-primary" href="views/index.html#/buss/taskLog/list1[id='+d.taskId+']">查看</a>'
                       }else if(d.logtype==-1){
                           return '<a class="font-primary" href="views/index.html#/buss/tixian/list1[taskId='+d.taskId+']">查看</a>'
                       }else if(d.logtype==2){
                           return '<a class="font-primary" href="views/index.html#/buss/dakaLog/list[id='+d.taskId+']">查看</a>'
                       }
                    }}
                , {field: 'price', title: '金额', width: 140, align: 'center'}
                , {field: 'addSub', title: '类型', width: 140, align: 'center', templet: function (d) {
                        return d.addSub==0?'减':'加';
                    }}
                , {field: 'createDate', title: '时间', width: 140, align: 'center'}
                , {field: 'remarks', title: '备注', width: 140, align: 'center'}

            ]]
            , done :function(res,curr,count){
                $(".layui-table-box").find("[data-field='id']").css("display","none");
            }
        });

        $("#search").click(function () {
            reloadTable(tableObj);
        });


    });
</script>

